﻿<Page
    x:Class="Microsoft.Samples.Office.UnifiedCommunications.Gadget.Gadget"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:svc="clr-namespace:Microsoft.Samples.Office.UnifiedCommunications.Gadget"
    xmlns:ComponentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
    xmlns:data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
    xmlns:presence="clr-namespace:Microsoft.Samples.Office.UnifiedCommunications.PresenceControls;assembly=WPFMOCPresenceControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    Loaded="Page_Loaded"
    mc:Ignorable="d" 
    VerticalAlignment="Top"
    HorizontalAlignment="Left"
    Title="Gadget">
    <Page.Resources>
        <BitmapImage x:Key="gadget_interior" UriSource="Resources\Images\background_interior.png" />
    </Page.Resources>
    <Viewbox Stretch="Uniform">
        <Grid Width="121" Height="195">
            <Image Source="{StaticResource gadget_interior}" Width="121" Height="195"/>
            <Grid>
    		    <Grid x:Name="gridSignIn" Visibility="Visible" VerticalAlignment="Center" Height="Auto" d:IsHidden="True">
    			    <Button x:Name="btnSignIn" Content="Connect" Click="btnSignIn_Click" Style="{DynamicResource BtnGeneric}" VerticalAlignment="Center" Width="100" Height="22"/>
    			    <TextBlock TextAlignment="Center" TextWrapping="Wrap" Margin="0,0,0,65" VerticalAlignment="Center" Height="Auto" FontFamily="Calibri" Foreground="#FFDAE4EE"><Run Text="Click to connect to Office Communicator"/></TextBlock>
    		    </Grid>
                
    		    <Grid x:Name="gridSignInError" Visibility="Collapsed" Margin="0,0,0,0" VerticalAlignment="Stretch" Height="Auto">
    			    <StackPanel VerticalAlignment="Bottom" Margin="0,0,0,5">
    				    <TextBlock x:Name="tbSignInError" TextAlignment="Center" TextWrapping="Wrap" Margin="5,0,5,0" VerticalAlignment="Stretch" FontFamily="Calibri" Foreground="#FFDAE4EE" FontSize="10"><Run Text="An "/><Run FontWeight="Bold" Foreground="#FFFF1B00" Text="error"/><Run Text=" occurred when attempting to connect to Communicator. Please make sure that Communicator is running and that you are signed in."/></TextBlock>
    			    </StackPanel>
    		    </Grid>

    		    <Grid x:Name="gridMyPersona" Visibility="Collapsed" Margin="0,0,0,0" VerticalAlignment="Top" Height="Auto">
    			    <Grid Visibility="Visible" VerticalAlignment="Top">
    				    <Ellipse HorizontalAlignment="Left" Width="18" Height="18" StrokeThickness="1" VerticalAlignment="Center" Margin="1.5,3,0,0">
    					    <Ellipse.Stroke>
    						    <LinearGradientBrush EndPoint="0.821,0.884" StartPoint="0.179,0.116">
    							    <GradientStop Color="#FF1F2433" Offset="0"/>
    							    <GradientStop Color="#FF626366" Offset="1"/>
    						    </LinearGradientBrush>
    					    </Ellipse.Stroke>
    					    <Ellipse.Fill>
    						    <LinearGradientBrush EndPoint="0.625,0.5" StartPoint="0.375,0.5">
    							    <GradientStop Color="#FF1D2232" Offset="0.004"/>
    							    <GradientStop Color="#FF373E50" Offset="1"/>
    						    </LinearGradientBrush>
    					    </Ellipse.Fill>
    				    </Ellipse>
                        
                        <Grid x:Name="gridPersona" Margin="3,3,0,0" 
                              HorizontalAlignment="Left" VerticalAlignment="Stretch">
                            <presence:Persona x:Name="personaUser" UseXAMLPresenceImages="True" Height="15" Width="15"/>
                        </Grid>
    				    
    				    <TextBlock x:Name="tbUserDisplayName" FontSize="12" FontFamily="Calibri" d:LayoutOverrides="Height" HorizontalAlignment="Left" Margin="27,3,0,0" Width="Auto" Foreground="#FF1C1F2A" VerticalAlignment="Center"/>
                        <TextBlock x:Name="tbUserDisplayName_Copy" FontSize="12" FontFamily="Calibri" HorizontalAlignment="Left" Width="Auto" d:LayoutOverrides="Height" Foreground="#FFFFFFFF" Text="{Binding Path=Text, ElementName=tbUserDisplayName, Mode=Default}" VerticalAlignment="Center" Margin="26,2,0,0"/>
    			    </Grid>
                    
    			    <Viewbox d:IsLayer="True" x:Name="phoneLayer" ToolTip="Voice Mail" 
                             Stretch="Uniform" VerticalAlignment="Center" Width="15" Height="15"  
                             HorizontalAlignment="Right" Margin="0,3,2,0" Visibility="Collapsed">
                        <Image x:Name="voiceMailNotify" Source="{DynamicResource VMSmall}" Cursor="Hand" Stretch="Fill"/>
    			    </Viewbox>
    		    </Grid>
                
    		    <Grid x:Name="gridEWSConfig" Visibility="Collapsed" Margin="0,0,0,0" VerticalAlignment="Center" Height="Auto">
    			    <TextBlock x:Name="tbConfiguration" TextAlignment="Center" TextWrapping="Wrap" FontFamily="Calibri" Foreground="#FFDAE4EE"><Run Text="Please configure the settings for the gadget."/></TextBlock>
    		    </Grid>
                
    		    <Grid x:Name="gridFav5" Visibility="Collapsed" Margin="0,30,0,0" VerticalAlignment="Stretch" Height="Auto">
    			    <Expander x:Name="expanderFav5" IsExpanded="True" HorizontalAlignment="Left" VerticalAlignment="Top" Header="Fav 5" Foreground="#FF6B6E79" FontFamily="Calibri" Style="{DynamicResource GadgetExpander}" Margin="1,0,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled">
    				    <Grid Margin="-5,0,0,0">
    					    <ListBox x:Name="listBoxFav5" BorderThickness="0" Background="{x:Null}" BorderBrush="{x:Null}" ItemTemplate="{DynamicResource GadgetListFav5}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="False" />
    				    </Grid>
    			    </Expander>
    		    </Grid>
                
    		    <Grid x:Name="gridTop5" Visibility="Collapsed" Margin="0,30,0,0" VerticalAlignment="Stretch" Height="Auto">
                    <Expander x:Name="expanderTop5" IsExpanded="False" HorizontalAlignment="Left" VerticalAlignment="Bottom" Header="Top 5" Foreground="#FF6B6E79" FontFamily="Calibri" Style="{DynamicResource GadgetExpander}" Margin="0,0,0,0" Visibility="Visible">
                        <Grid Margin="-5,0,0,0">
                            <ListBox x:Name="listBoxTop5" BorderThickness="0" VerticalAlignment="Center" Background="{x:Null}" BorderBrush="{x:Null}" ItemTemplate="{DynamicResource GadgetListFav5}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="False" />
                        </Grid>
                    </Expander>
                </Grid>
                
    		    <Grid Margin="0,0,2,0" VerticalAlignment="Bottom" Height="14.333" x:Name="configGrid" HorizontalAlignment="Right" Width="14.333" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
    			    <Grid.RenderTransform>
    				    <TransformGroup>
    					    <ScaleTransform ScaleX="1" ScaleY="1"/>
    					    <SkewTransform AngleX="0" AngleY="0"/>
    					    <RotateTransform Angle="90"/>
    					    <TranslateTransform X="0" Y="0"/>
    				    </TransformGroup>
    			    </Grid.RenderTransform>
    			    <Viewbox d:IsLayer="True" x:Name="Layer_1" Stretch="Uniform" Cursor="Hand" 
                             VerticalAlignment="Center" HorizontalAlignment="Right" 
                             Width="Auto" Height="Auto">
    				    <Grid Width="380" Height="380">
                            <Rectangle Opacity="0" Width="380" Height="380" Fill="#000000"/>
    					    <Path x:Name="Path" Stretch="Fill" Fill="#FF61616D" Data="F1 M 144.569,138.659C 160.809,123.075 186.608,123.605 202.193,139.845L 315.26,257.665C 330.845,273.905 330.314,299.704 314.074,315.288C 297.835,330.873 272.036,330.342 256.451,314.102L 143.383,196.283C 127.799,180.043 128.33,154.244 144.569,138.659 Z M 285.569,264.269C 274.864,264.269 266.186,272.947 266.186,283.652C 266.186,294.357 274.864,303.035 285.569,303.035C 296.274,303.035 304.952,294.357 304.952,283.652C 304.952,272.947 296.274,264.269 285.569,264.269 Z " Margin="132.034,127.309,53.389,53.362" Stroke="#FF1B1C20"/>
    					    <Path x:Name="Path_0" Stretch="Fill" StrokeLineJoin="Round" Stroke="{x:Null}" Fill="#FF61616D" Data="M 116.455,46.2137C 157.936,46.2137 191.563,79.8407 191.563,121.322C 191.563,162.803 157.936,196.43 116.455,196.43C 74.9738,196.43 41.3468,162.803 41.3468,121.322C 41.3468,106.798 43.657,101.801 50.7958,90.3094L 96.3452,136.343C 100.896,140.876 107.604,129.168 112.136,124.618L 131.994,104.678C 136.527,100.128 136.754,95.3264 132.203,90.794L 90.0458,51.0594C 97.3122,48.7176 108.41,46.2137 116.455,46.2137 Z " Margin="40.847,45.714,187.937,183.07" StrokeThickness="3"/>
    				    </Grid>
    			    </Viewbox>
    		    </Grid>
    	    </Grid>
        </Grid>
    </Viewbox>
</Page>
